package com.cook.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cook.entity.User;
import com.cook.vo.admin.AllUserDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据用户ID查询用户详情
     * @param userId 用户ID
     * @return 用户详情
     */
    AllUserDetailVO selectUserDetailById(@Param("userId") Long userId);

    /**
     * 根据用户ID更新用户信息
     * @param user
     * @return 影响行数
     */
    int updateUserById(User user);

}